﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using Model;
using TakeoutMangesDAL;

namespace TakeoutMangesBLL
{
    public class ProductBLL
    {
        public static List<Model.Product> getProduct(string Name)
        {
            return ProductDAL.getProduct(Name);
        }

        public static List<Model.Product> GetProductCategory(int id, int PageCount, int PageNumber)
        {
            return ProductDAL.GetProductCategory(id,PageCount,PageNumber);
        }

        public static List<Model.Product> getProductinfo(int id)
        {
            return ProductDAL.getProductinfo(id);
        }
        public static List<Product> GetProductInfo(int page, int pagesize, out int totalCount, string ProductName)
        {
            return ProductDAL.GetProductInfo(page,pagesize,out totalCount,ProductName);
        }
        public static bool XJ(int ProductID)
        {
            return ProductDAL.XJ(ProductID) == 1 ? true : false;
        }
        public static bool SJ(int ProductID)
        {
            return ProductDAL.SJ(ProductID) == 1 ? true : false;
        }
        public static int AddProduct(Product pd)
        {
            return ProductDAL.AddProduct(pd);
        }
        public static List<Model.Product> Getcount(int id)
        {
            return ProductDAL.Getcount(id);
        }
        }
}
